<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>产品信息</title>
</head>

<body>
    <form class="layui-form" action="">

        <div class="select common">
            <div class="select-title">查询条件</div>

            <div class="select-con">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">商品名称:</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="spmc" search-type="spmc">
                        </div>
                    </div>
                </div>
                <div class="select-btn">
                    <div class="layui-bg-green comquery " lay-event="search">查询</div>
                    <div class="layui-bg-green comquery " lay-event="reset">重置</div>
                </div>
            </div>
        </div>
    </form>

    <div class="common-padding">
        <table class="layui-hide" id="zztransfers" lay-filter="zztransfers"></table>
    </div>
</body>
<!-- 头部 -->
<script type="text/html" id="toolbarinter">
    <div class="layui-btn-container ">
        <button class="layui-btn  layui-btn-sm colors" lay-event="add"><i class="layui-icon"></i></i>选择调拨品</button>
        <button class="layui-btn  layui-btn-sm colors" lay-event="delete"><i class="layui-icon"></i>删除</button>
    </div>
</script>

<!-- 里面的查看 -->
<script type="text/html" id="More">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
</script>
<script src="../../../../js/module/jquery-3.4.1.min.js"></script>
<script>
    layui.config({
        base: '../../../../js/module/'
    }).use(['Services', 'jquery'], function() {
        var $ = layui.jquery;

        var dataType = "zztransfers";
        var services = new layui.Services({
            baseURL: baseaip,
            tableId: "zztransfers",
            toolbar: "#toolbarinter",
            serachUrl: "dictionaries/query",
            getUrl: "dictionaries/get",
            delUrl: "dictionaries/delete",
            updUrl: "plant/updateNcpxx",
            saveUrl: "./newpage/addtransfers.html",
            deleteField: "id",
            dataType: dataType,
            parameter: {
                keyword: '',
                type: dataType
            },
            cols: [
                [{
                        type: 'checkbox',
                        fixed: 'left'
                    }, {
                        field: 'productname',
                        sort: true,
                        title: '商品名称',
                        templet: function(data) {

                            return (JSON.parse(data.context)).spmc
                        }
                    }, {
                        field: 'pc',
                        sort: true,
                        title: '批次',
                        templet: function(data) {

                            return (JSON.parse(data.context)).pc
                        }
                    }, {
                        field: 'dprq',
                        sort: true,
                        title: '调拨日期',
                        templet: function(data) {

                            return (JSON.parse(data.context)).dprq
                        }
                    },

                    {
                        field: 'kcsl',
                        sort: true,
                        title: '库存数量',
                        templet: function(data) {

                            return (JSON.parse(data.context)).kcsl
                        }
                    }, {
                        field: 'kczl',
                        sort: true,
                        title: '库存重量',
                        templet: function(data) {

                            return (JSON.parse(data.context)).kczl
                        }
                    }, {
                        field: 'drck',
                        sort: true,
                        title: '调入仓库',
                        templet: function(data) {

                            return (JSON.parse(data.context)).drck
                        }
                    }, {
                        field: 'unit',
                        sort: true,
                        title: '调入二级仓库',
                        templet: function(data) {

                            return (JSON.parse(data.context)).unit
                        }
                    }, {
                        field: 'dcsl',
                        sort: true,
                        title: '调出数量',
                        templet: function(data) {
                            return (JSON.parse(data.context)).dcsl
                        }
                    }, {
                        field: 'dczl',
                        sort: true,
                        title: '调出重量',
                        templet: function(data) {
                            return (JSON.parse(data.context)).dczl
                        }
                    }
                ]
            ],
        });
    });
</script>

</html>